﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ForeProgram/Shared/Shop.master"
    AutoEventWireup="true" CodeFile="shopCartView.aspx.cs" Inherits="ForeProgram_shopCartView" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<link rel="stylesheet" href="css/shoppingcart.css" type="text/css" />
<script type="text/javascript">
    //dwr回调按钮的隐藏和显示
    function swithBtn(type) {
        if (type == 'hidden') {
            document.getElementById("submitBtnArea").style.display = "none";
            document.getElementById("otherBtnArea").style.display = "none";
            document.getElementById("dealDwr").style.display = "";

        } else {
            document.getElementById("submitBtnArea").style.display = "";
            document.getElementById("otherBtnArea").style.display = "";
            document.getElementById("dealDwr").style.display = "none";
        }
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <div class="cbody">
        <div class="Wrap_cart">
            <!--mycart_tip end -->
            <div class="BuyCon">
                <div class="BuyContent">
                    <!-- buyflow -->
                    <div class="buyflow">
                        <div class="flow buyone">
                            <ul>
                                <li class="one"><strong class="F_red">我挑选的商品</strong></li>
                                <li class="two">填写核对订单信息</li>
                                <li class="three">生成订单</li>
                            </ul>
                        </div>
                        <img src="images/buyicobg.gif" align="absmiddle">
                    </div>
                </div>
                <!--End: buyflow -->
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
            </div>
            <div class="clear">
            </div>
            <div class="List_cart marginb10">
                <h6>
                    <strong>我挑选的商品</strong></h6>
                <div class="cart_table">
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                    <asp:GridView ID="gvTable" runat="server" GridLines="None" BorderWidth="0" CssClass="mallTab mallproTab" 
                        style="border-collapse: collapse; width: 930px;  margin: 0 auto; border: 0px #cbcbcb solid; border-top: none; margin-top: 10px" 
                        Width="100%" AutoGenerateColumns="False" DataKeyNames="cartid,productid"
                        onrowdatabound="gvTable_RowDataBound" onrowdeleting="gvTable_RowDeleting" 
                            onrowcommand="gvTable_RowCommand" >
                            <Columns>
                            <asp:TemplateField HeaderText="商品" HeaderStyle-Width="89"  HeaderStyle-CssClass="widthpic">
                                    <ItemTemplate>
                                        <asp:Image ID="imgProduct" width="60" height="60" runat="server" />
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="widthpic" Width="89px" />
                                </asp:TemplateField>
                               <asp:TemplateField  HeaderStyle-Width="393" HeaderText="商品名称" HeaderStyle-CssClass="width01">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="hlProduct" Target="_parent" runat="server"></asp:HyperLink>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="width01" Width="393px" />
                                </asp:TemplateField>
                                <asp:BoundField  HeaderStyle-Width="75" DataField="productid" HeaderText="商品编号" HeaderStyle-CssClass="width01">
                                    <HeaderStyle CssClass="width01" Width="75px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField  HeaderStyle-Width="70" DataField="unitprice" DataFormatString="{0:0.00}" HeaderText="价格" HeaderStyle-CssClass="width01">
                                    <HeaderStyle CssClass="width01" Width="70px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:BoundField  HeaderStyle-Width="72" DataField="timeName" HeaderText="使用期限" HeaderStyle-CssClass="width01">
                                    <HeaderStyle CssClass="width01" Width="72px" />
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:BoundField>
                                <asp:TemplateField  HeaderStyle-Width="98" HeaderText="数量" HeaderStyle-CssClass="width02">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="imgSub" ImageUrl="images/bag_close.gif" CommandName="sub" style="display: inline; border:none;" runat="server" /><!--减一-->
                                        <asp:TextBox ID="proCount"  class="width04" style="height: 14px; width: 30px;"   value="1" runat="server" AutoPostBack="True" 
                                            ontextchanged="proCount_TextChanged"></asp:TextBox>
                                         <asp:ImageButton ID="imgAdd" ImageUrl="images/bag_open.gif" CommandName="add"  style="display: inline; border:none;" runat="server" /><!--加一-->
                                    <input type="hidden" name="rushQty" id="rushQty_0" value="">
                                    <input type="hidden" name="userOverQty" id="userOverQty_0">
                                    <input type="hidden" value="" name="orderOverQty" id="orderOverQty_0">
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="width02" Width="98px" />
                                </asp:TemplateField>
                                <asp:CommandField ShowDeleteButton="True" HeaderText="删除商品"  
                                    HeaderStyle-Width="105" HeaderStyle-CssClass="width02" >
                                <HeaderStyle CssClass="width02" Width="105px" />
                                </asp:CommandField>
                            </Columns>
                   </asp:GridView>
                    <div class="malltabSum" style="margin-bottom: 10px">
                        共 <asp:Label ID="lblCount" style="font-size: 13px; font-family: Arial;" runat="server" Text=""></asp:Label> 件,
                        合计：<asp:Label ID="lblTotal" style="font-size: 13px; font-family: Arial;" runat="server" Text=""></asp:Label>
                        <br>
                        <input type="hidden" name="sessionMember" id="sessionMember" value="">
                        <p id="submitBtnArea" class="errorNote" style="float: right; padding-top: 10px">
                            <a href="#">
                                <asp:ImageButton ID="imgOrder" OnClientClick="swithBtn('hidden');return true;" ImageUrl="images/btn_next02.gif" width="110" 
                                height="38" border="0" ToolTip="去结算" runat="server" onclick="imgOrder_Click" /></a></p>
                    </div>
                    </ContentTemplate>
                    </asp:UpdatePanel>
                    <div id="otherBtnArea" style="padding-left: 10px">
                        <asp:HyperLink NavigateUrl="product.aspx" ID="hlProduct" runat="server"> <img src="images/btn_keepshopping.gif" alt="继续购物" border="0" align="absmiddle">
                        </asp:HyperLink>
                        <a href="#">
                            <asp:ImageButton ID="imgClear" ImageUrl="images/btn_dellist02.gif"  
                            border="0" align="absmiddle" ToolTip="清空购物车" runat="server" 
                            onclick="imgClear_Click" /></a></div>
                    <div id="dealDwr" style="padding-right: 10px; display: none" class="clear">
                        <div style="border: 1px #01b703 solid; background-color: #f1fde5; color: #01b703;
                            padding: 2px; padding-left: 25px; padding-right: 25px; float: right">
                            正在转向订单信息填写页面,请稍候！</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
